const express = require("express")
const router = express.Router()
const register = require('./registerRouter')
const login = require("./loginRouter")
const types = require("./type")
const getData = require("./getData")
const add = require("./addData")

const getAdd = require("./getAdd")
const del = require("./delData")
// 挂载注册业务
router.use("/index", register)
// 挂载登录业务
router.use("/index", login)
// 挂载渲染列表业务
router.use("/index", types)
// 挂载渲染列表业务
router.use("/index", getData)
// 挂载添加业务
router.use("/index", add)

router.use("/index", getAdd)
// 删除
router.use("/index", del)

// 错误中间件
router.use("/", function (err, req, res, next) {
    console.log("router中间件", err)

})

module.exports = router